package DesignPatern.A15_组合模式.QSB.A03_抽象模式优化2;

import java.util.ArrayList;

/**
 * @Author: Du
 * @Date: 2021/8/2 10:41
 */
public class Branch extends Crop
{
    ArrayList<Crop> subList = new ArrayList<>();
    
    public Branch(String name, String position, int salary)
    {
        super(name, position, salary);
    }
    
    public void addSubList(Crop crop)
    {
        this.subList.add(crop);
    }
    
    public ArrayList<Crop> getSubList()
    {
        return this.subList;
    }
    
}
